/**
 * 
 */
package com.wuditp.smile.core.domain;

import java.util.List;

/**
 * @author kevin.tao
 * 
 */
public interface TreeNodeable extends CodeNameable {
	static final String ROOT = "root";

	boolean isRoot();

	boolean isBranch();

	boolean isLeaf();

	TreeNodeable getParent();

	<T extends TreeNodeable> void setParent(T parent);

	List<? extends TreeNodeable> getChildrens();

	<T extends TreeNodeable> void addChildren(T entry);

	<T extends TreeNodeable> void setChildrens(List<T> childrens);

	<T extends TreeNodeable> void removeChildren(T entry);
}
